@(spurningar: List[models.Spurningar], svor: List[Svor], user: User)

@main(user) {
    <div class="container">
        <div class="tabbable">
            @helper.form(action = routes.Application.submitQuiz()) {
                <div class="tab-content">
                @for(spu <- spurningar) {
                    @if(spu.id == 1){
                        <div id="@spu.id" class="tab-pane active">
                    }else{
                        <div id="@spu.id" class="tab-pane">
                    }
                        <fieldset>
                            <div id="demo"></div>

                        <h3> @spu.spurning </h3>
                            @for(svar <- svor) {
                                @if(spu.id == svar.spurningid) {
                                    <div class="span4">
                                        <input type="radio" checked="checked" name="@svar.spurningid" value="@svar.rett"> @svar.svar <BR>
                                    </div>
                                }
                            }
                            @if(spu.id < spurningar.length){
                                    <a href="#@(spu.id+1)" role="button" class="btn" data-toggle="tab"> Velja</a>

                            }else{
                                <div class="control-group">
                                    <div class="form-actions">
                                        <input id="myButtonId" type="submit" class="btn btn-primary" value="svara">
                                    </div>
                                </div>
                            }
                        </fieldset>
                    </div>
                            }
                </div>



            }
        </div>
    </div>

    <script type="text/javascript">
            var myCountdown2 = new Countdown({time: 30, width:200, height:80, rangeHi:"minute"});
            setInterval(function () {document.getElementById("myButtonId").click();}, 30000);
    </script>
}